require('./apis/index')
const express = require('express')
const app = express()
const cors = require('cors')
const bodyParser = require('body-parser')

// 中间件配置
app.use(cors())
app.use(bodyParser.json())

// 路由挂载
app.use('/api/commonUsers', require('./apis/routes/commonUsers'))
// 可根据需要添加其他路由

// 启动服务器
const PORT = process.env.PORT || 3001
app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`)
})

require('./models/sync')
require('./services/index')
